#ifndef _READMAP_H_
#define _READMAP_H_

#include <iostream>
#include <string>
#include <fstream>
#include "Global.h"
#include "Object.h"
#include "Camera.h"
#include <list>


using namespace std;
class CLoadBackground
{
private:
	int TotalLine;		//Tong so dong trong txt
	int TotalTile;		//Tong so tile set trong background
	list<CObject> Object;	//Tap hop cac doi tuong trong map
	CSprite * Background;
public:
	int _widthMap, _heightMap;
	CLoadBackground();
	void ImportFile(char *FileName);
	void SplitString(string line, int i);
	void SplitString(string line);
	int StringToInt(string text);
	int GetTotal();
	void AddResource();
	void DrawMap(CCamera *Camera);
};
#endif